<?php

/* 

 * To change this license header, choose License Headers in Project Properties.

 * To change this template file, choose Tools | Templates

 * and open the template in the editor.

 */
require("db_conn.php");//包含连接文件
$sql="SELECT * FROM `tb_ad`  where isshow=1   order by id desc limit 0,5 ";   //写查询语句  isshow=1   取5个    
$adrs=$db->query($sql); //执行语句  $rs是一个结果集
$adrows=$adrs->fetch_all(MYSQLI_BOTH);   //包括所有行 $adrows有数据库的焦点广告
//conceot表
$sqlb="select * from tb_conceot LIMIT 0,3";
$cors=$db->query($sqlb);
$corows=$cors->fetch_all(MYSQLI_BOTH);
require 'index_html.php';
//释放结果集

//$result->free();

//关闭数据库

$db->close();
